<?php
namespace Admin\Controller;

use Think\Controller;
use Admin\Common\Logic;

class AdminUserController extends BaseController {
 private $HAND_LOGINC   = null;


 protected function _initialize(){
    $this->HAND_LOGINC = new Logic();

 }
     public function index(){
     $this->display();
  }

  public function admin_list(){
    	$model =D("admin");
        $data = $this->_list($model,$map);
        //$json_data = json_encode($data);
        $this->ajaxReturn($data);
      // echo $json_data;
  }

  public function sel_nav(){
     $id= empty($_REQUEST['id'])?"1":$_REQUEST['id'];
     //获取到该管理员的权限
    $list=  $this->HAND_LOGINC->sel_nav($id);
    $json_menu = json_encode($list);
    $menu_data = str_replace('iconcls','iconCls', $json_menu);
    echo $menu_data;


  }


//编辑权限
  public function sel_nav_add(){
     $id= empty($_REQUEST['id'])?"1":$_REQUEST['id'];
     //获取到该管理员的权限
    $list=  $this->HAND_LOGINC->sel_nav_add($id);
    $json_menu = json_encode($list);
    $menu_data = str_replace('iconcls','iconCls', $json_menu);
    echo $menu_data;


  }
}
